package cn.java59;

import java.util.Scanner;

public class Homework5 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("输入第一个数：");
		int a = sc.nextInt();
		System.out.println("输入第二个数：");
		int b = sc.nextInt();
		System.out.println("输入第三个数：");
		int c = sc.nextInt();
		if (a > b && a > c && b > c) {
			System.out.println("最大值为:" + a + "最小值为:" + c);

		} else if (a > b && a > c && b < c) {
			System.out.println("最大值为:" + a + "最小值为:" + b);

		} else if (b > a && b > c && a > c) {
			System.out.println("最大值为:" + b + "最小值为:" + c);

		} else if (b > a && b > c && a < c) {
			System.out.println("最大值为:" + b + "最小值为:" + a);

		} else if (c > b && c > a && a > b) {
			System.out.println("最大值为:" + c + "最小值为:" + b);

		} else if (c > b && c > a && b > a) {
			System.out.println("最大值为:" + c + "最小值为:" + a);

		} else {
			System.out.println("输入有误");

		}

	}

}
